#ifndef UART_H
#define UART_H

#include "stdio.h"
#include "string.h"
#include "ti_msp_dl_config.h"

void uart_init();

void serial_send_char(char ch);
void serial_send_str(char *str);
void serial_send_str_with_len(char *str, uint16_t len);
void serial_Log_str(char *tag, char *str);

// receive low speed serial data
// mainly used for command rec use UART0
// 这里可以考虑使用环形缓冲区
bool serial_is_available();
char *serial_read_string();

// receive high speed serial data
// mainly used for communicating with other module use UART2
void setCurrentDataLock(bool is_lock);
uint16_t getCurrentUartData(uint8_t **buff_ptr);

#endif